package com.glut.mapper;

import com.github.pagehelper.Page;
import com.glut.vo.SstsFeedback;
import com.glut.vo.SstsUsers;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author:沈林玉
 * @date:2020/2/13 10:39
 * @Description:
 */
@Repository
public interface SstsFeedbackMapper {

    /**
     * 1.查询未处理的反馈信息
     * @return
     */
    public Page<SstsFeedback> selectAllNotFeedback(@Param("sstsFeedback") SstsFeedback sstsFeedback,
                                                   @Param("pageNum") int pageNum,
                                                   @Param("pageSize") int pageSize);

    /**
     * 1.1 通过用户id查询未处理反馈信息
     * @param sstsUserID
     * @return
     */
    public Page<SstsFeedback> selectNotFeedbackByUserId(@Param("sstsUserID")String sstsUserID,
                                                        @Param("pageNum") int pageNum,
                                                        @Param("pageSize") int pageSize);


    /**
     * 2.查询已经处理的反馈信息
     * @return
     */
    public Page<SstsFeedback> selectAllDealFeedback(@Param("sstsFeedback") SstsFeedback sstsFeedback,
                                                    @Param("pageNum") int pageNum,
                                                    @Param("pageSize") int pageSize);

    /**
     * 2.1 通过用户id查询已处理反馈信息
     * @param sstsUserID
     * @return
     */
    public Page<SstsFeedback> selectDealFeedbackByUserId(@Param("sstsUserID")String sstsUserID,
                                                         @Param("pageNum") int pageNum,
                                                         @Param("pageSize") int pageSize);

    /**
     * 3.插入未处理的反馈信息
     * @param sstsFeedback
     * @return
     */
    public int insertNotFeedback(SstsFeedback sstsFeedback);

    /**
     * 4.处理反馈信息
     * @param sstsFeedback
     * @return
     */
    public int updateNotFeedback(SstsFeedback sstsFeedback);

}
